package com.sg.business.model;

import java.util.List;

import com.mobnut.db.file.IServerFile;
import com.mobnut.db.model.PrimaryObject;

public interface IPDMServiceProvider {

	public static final String F_PLM_TYPE = "plmtype";

	public static final String PLM_TYPE_FOLDER = "pmfolder";

	public static final String PLM_TYPE_DOCUMENT = "pmdocument";

	void doInsertBefore(PrimaryObject po) throws Exception;

	void doInsertAfter(PrimaryObject po, boolean syncExcute) throws Exception;

	void doUpdateBefore(PrimaryObject po, String[] fields) throws Exception;

	void doUpdateAfter(PrimaryObject po, String[] fields, boolean syncExcute)
			throws Exception;

	void doRemoveBefore(PrimaryObject po, String deleteAction) throws Exception;

	void doMoveBefore(Document document) throws Exception;

	void doMoveAfter(Document document, boolean syncExcute) throws Exception;

	void doUpdateRevision(Document document) throws Exception;

	void doSetLifeCycleStatusBefore(Document document) throws Exception;

	void doSetLifeCycleStatusAfter(Document document, boolean b)
			throws Exception;

	void doChangePhaseBefore(Document document) throws Exception;

	void doChangePhaseAfter(Document document, boolean b) throws Exception;

	void forceSync(PrimaryObject po) throws Exception;

	String getViewURL(Document document);

	String getObjectInformationURL(PrimaryObject po);

	String getObjectInformationOid(PrimaryObject po);

	String getPLMUser(Folder folder);

	String getPLMPassWord(Folder folder);

	boolean provideContent(Document document);

	IServerFile getContentFile(Document document);

	List<String> getPLMRelativeObject(Document document, String[] toType,
			boolean b) throws Exception;

	String getCadUrl(Document document) throws Exception;
}
